<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<include file="Widget/head" />
	<link rel="stylesheet" href="__PUBLIC__/kindeditor-4.1.10/themes/default/default.css" />
	<script charset="utf-8" src="__PUBLIC__/kindeditor-4.1.10/kindeditor-min.js"></script>
	<script charset="utf-8" src="__PUBLIC__/kindeditor-4.1.10/lang/zh_CN.js"></script>
	<script type="text/javascript">
	var myeditor;
	KindEditor.ready(function(K) {
		myeditor = K.create('textarea[name="content"]', {
			urlType:'domain',
			allowFileManager : true,
			//autoHeightMode : true,
			afterCreate : function() {
				this.loadPlugin('autoheight');
			},
			afterUpload : function(url) {
				var firstimageoption = '<option value="' + url + '">' + url + '</option>';
				var selectoption = '<option value="' + url + '" selected="selected">' + url + '</option>';
				$("#firstimage").append(firstimageoption);
				$("#images").append(selectoption);
			}
		});
	});
	$(function(){
		
	});
	function submitForm(){
		$("body").easyMask('show');
		myeditor.sync();
		$('#myform').form('submit',{
			success: function(dd){
				$("body").easyMask('hide');
				dd = eval('(' + dd + ')');
				$.messager.alert('',dd.info,'info');
			}
		});
	}
	function clearForm(){
		$('#ff').form('clear');
	}
	</script>
</head>

<body>
<div style="padding:10px 0;">
	<form id="myform" method="post" action="{:U('update')}">
	<input type="hidden" name="id" value="{$info['id']}" />
	<table cellspacing="0" cellpadding="5" width="100%">
		<tr>
			<td width="25%" align="right">栏目名称：</td>
			<td width="75%"><b>{$info['title']}</b></td>
		</tr>
		<tr>
			<td align="right">内容：</td>
			<td>
				<textarea name="content" style="height:470px;width:90%;">{$info['content']}</textarea>
			</td>
		</tr>
	</table>
	</form>
	<div style="text-align:center;padding:5px">
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="padding:5px 10px;margin-right:25px;" data-options="iconCls:'icon-save'">提交</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="padding:5px 10px;" data-options="iconCls:'icon-undo'">重置</a>
	</div>
</div>
</body>
</html>